package com.naruto.thinkmgr.configuration;

import com.roc.dubbo.config.spring.AnnotationBean;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@Import(DubboBaseConfig.class)
@AutoConfigureAfter(DubboBaseConfig.class)
public class DubboConfiguration {

    private final Logger logger = LogManager.getLogger(getClass());

    @Bean
    // @DependsOn("dubboConfiguration")
    public AnnotationBean dubboAnnotationBean() {
        AnnotationBean annotationBean = new AnnotationBean();
        // annotationBean.setApplicationContext(applicationContext);
        // annotationBean.setPackage(dubboProperties.getAnnotationPackage());
        annotationBean.setPackage("com.naruto.thinkmgr");
        logger.info("加入自定义" + annotationBean);
        return annotationBean;
    }

}